package crp.core.portal.domain.messages;

import crp.core.shared.LifecycleStatus;
import com.qwlabs.exceptions.NotFoundException;
import com.qwlabs.exceptions.ServiceValidationException;
import org.jboss.logging.annotations.Message;
import org.jboss.logging.annotations.MessageBundle;

import javax.inject.Inject;

import static org.jboss.logging.Messages.getBundle;

@MessageBundle(projectCode = "CRP-PORTAL")
public interface PortalMessages {
    @Inject
    PortalMessages INSTANCE = getBundle(PortalMessages.class);

    @Message(value = "找不到该栏目, id:{0}", format = Message.Format.MESSAGE_FORMAT)
    NotFoundException sectionNotFound(String id);

    @Message(value = "找不到该新闻, id:{0}", format = Message.Format.MESSAGE_FORMAT)
    NotFoundException newsArticleNotFound(String id);

    @Message(value = "{0}状态的新闻无法删除", format = Message.Format.MESSAGE_FORMAT)
    ServiceValidationException canNotDeleteNewsArticle(LifecycleStatus status);
}
